| Date tip published: | 05/22/2008 |
| Description: | Notes and Domino will take any URL in Rich Text field and automatically convert it to a clickable URL hotspot. This can be a time saver, but there may be times when you don't want this behavior. This tip will cover a quick and easy way to prevent the automatic conversion of a URL into a hotspot. |
To learn more about web development use the following links:
Developing Domino 7 Web Applications
Developing Domino 8 Web Applications
Preventing the Automatic Conversion of a URL to a Hotspot
Notes and Domino will convert any URL into a clickable hotspot. For example, this web page is a Domino document. Below is text that starts with "http://". This text is converted to a clickable URL when the Domino HTTP task converts this document to HTML:
Notes and Domino will also render text that starts with "https://" into a clickable URL.
This same behavior happens in the Notes client for text starting with http:// or https:// . Below is an image of a Rich Text field in edit mode. Note that in edit mode (when first adding the text) the URL is not a hotspot:
The next image shows the same document in read mode. The text beginning with http:// is now a hotspot:
Switching back to Edit mode shows that the URL was converted into a hotspot. The hotspot can be temporarily removed by choosing Remove Hotspot from the right-click context menu or by choosing Hotspot | Remove Hotspot from the Notes menu. However, once the document is saved and re-opened, the URL is once again converted to a Hotspot.
Notes URLs are also Converted
Any text starting with "Notes://" is also converted to a hotspot. When a Notes URL is clicked, the Notes client opens to the referenced Notes element (document, view, form, etc.).
|
|
Preventing Automatic Hotspot Creation
You may not always want URLs converted to hotspots. One way to prevent a URL from being converted is to add it to a Text type field. URLs in Text fields are never converted to hotspots.
To prevent automatic hotspot generation in a Rich Text field, mark the text as Pass-Thru HTML. The URL below is marked in this manner:http://www.tlcc.com
To mark text as Pass-Thru HTML, highlight the text and then choose Text | Pass-Thru HTML from the menu.
NOTE: If a hotspot was previously generated you must first remove the hotspot by clicking on the text and choosing Hotspot | Remove Hotspot from the menu.
In edit mode, the text is displayed with a gray background to indicate it has been set as Pass-Thru HTML:
The following image shows the results when the same document is viewed in Notes in read mode:
The text marked as Pass-Thru HTML will lose any formatting that was set in the Notes client, however, the formatting can be set by using HTML tags.
A URL with no HTML tags but Pass-Thru HTML:http://www.tlcc.com
A URL with added HTML tags and Pass-Thru HTML:http://www.tlcc.com
Below is an image of the above text as it appears in edit mode in the Notes client:
|